<template>
	<!-- 导师详情 -->
	<view class="app">
		<!-- 人物 -->
		<view class="rw" v-for="(item,index) in list1" :key="index">
			<view class="rw-a">
				<view class="rw-a-a">
					<view class="rw-a-a-a">
						<image :src="item.img" style="width: 100%; height: 100%;"></image>
					</view>
				</view>
				<view class="rw-a-b">
					<view class="rw-a-b-a">
						<text style="font-size: 20px; font-weight: bold;">{{item.name}}</text>
					</view>
					<view class="rw-a-b-b">
						<text style="font-size: 15px;">{{item.ly}}</text>
					</view>
				</view>
				<view class="rw-a-c">
					<view class="rw-a-c-a">
						<text style="color: white; font-size: 15px;">+ 关注</text>
					</view>
				</view>
			</view>
			<view class="rw-b">
				<view class="rw-b-a" v-for="(item,index) in list" :key="index">
					<view class="rw-b-a-a">
						<text>{{item.a}}</text>
					</view>
					<view class="rw-b-a-b">
						<text>{{item.kfkc}}</text>
					</view>
				</view>
			</view>
		</view>
		<!-- 课程简介 -->
		<view class="kcjianj">
			<view class="kcjianj-a">
				<text style="font-size: 20px; font-weight: bold;">讲师简介</text>
			</view>
			<view class="kcjianj-b">
				<text>{{jsjj}}</text>
			</view>
		</view>
		<!-- 团队成员 -->
		<view class="tdcy">
			<view class="tdcy-a">
				<text style="font-size: 20px; font-weight: bold; margin-left: 20px;">团队成员({{a}})</text>
			</view>
			<view class="tdcy-b">
				<view class="tdcy-b-a" v-for="(item,index) in aaa" :key="index">
					<view class="tdcy-b-a-a">
						<image :src="item.img"></image>
					</view>
					<view class="tdcy-b-a-b">
						<view class="tdcy-b-a-b-a">
							<text>{{item.name}}</text>
							<view>查看</view>
						</view>
						<view class="tdcy-b-a-b-b">
							<text>{{item.kc}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="kc">
			<view class="kc-a">
				<view :style="style" class="kc-a-a" @click="updateStyle(index)">
					<text>课程</text>
				</view>
				<view :style="style1" class="kc-a-b" @click="updateStyle(index + 1)">
					<text>技巧</text>
				</view>
				<view :style="style2" class="kc-a-c" @click="updateStyle(index + 2)">
					<text>文章</text>
				</view>
			</view>
			<view class="kec">
				<view class="kec-a" v-if="activeStyle">
					<!-- 全部课程 -->
					<view class="qbkc">
						<view class="qbkc-c" v-for="(item,index) in list4" :key="index">
							<view class="qbkc-c-a">
								<image :src="item.image" style="width: 100%; height: 100%;"></image>
							</view>
							<view class="qbkc-c-b">
								<text style="font-weight: bold; font-size: 18px;">{{item.title}}</text>
								<view>
									<text style="font-size: 14px; color: #999999;">{{item.a}}|
										<text style="font-size: 14px; color: #999999;">{{item.b}}</text>
									</text>
								</view>
								<view style="display: flex;justify-content: space-between;">
									<view style="display: flex;">
										<u-icon name="account"></u-icon>
										<text style="font-size: 15px; color: #999999;">{{item.name}}</text>
									</view>
									<view>
										<text style="font-size: 20px; color: #FAA007;"><text
												style="font-size: 10px; color: #FAA007;">￥</text>{{item.money}}</text>
									</view>
								</view>
							</view>
						</view>
					</view>
					<!-- 加载更多 -->
					<view class="jiazz">
						<view class="jiazz-a u-border-bottom" v-for="(item, index) in bbb" :key="index">
							{{'第' + item + '条数据'}}
						</view>
						<u-loadmore :status="status" />
					</view>

				</view>
				<view class="kec-b" v-if="activeStyle1">
					<!-- 全部课程 -->
					<view class="kechen">
						<view class="kechen-a">

						</view>
						<view class="kechen-b">

						</view>
					</view>
				</view>
				<view class="kec-c" v-if="activeStyle2">
					文章
				</view>
			</view>
		</view>

	</view>
</template>


<script>
	export default {
		data() {
			return {
				list2: [{
						img: '/static/u93.png',
						kename: 'IOS高级课程',
						name: '方得得',
						people: 250,
						tx: '/static/u2542.png'
					},
					{
						img: '/static/u93.png',
						kename: 'IOS高级课程',
						name: '方域名',
						people: 250,
						tx: '/static/u2542.png'
					}
				],
				bbb: 0,
				list4: [{
						image: '/static/u133.png',
						title: '成为演讲高手',
						a: '销售',
						b: '基础入门',
						name: '钱白胜',
						money: '99.00'
					}, {
						image: '/static/u133.png',
						title: '成为演讲高手',
						a: '销售',
						b: '基础入门',
						name: '钱白胜',
						money: '99.00'
					},
					{
						image: '/static/u133.png',
						title: '成为演讲高手',
						a: '销售',
						b: '基础入门',
						name: '钱白胜',
						money: '99.00'
					}
				],
				aaa: [{
					img: '/static/u2989.png',
					name: '叶东',
					kc: '梧州学院高级教师'
				}, {
					img: '/static/u2989.png',
					name: '叶东',
					kc: '梧州学院高级教师'
				}, {
					img: '/static/u2989.png',
					name: '叶东',
					kc: '梧州学院高级教师'
				}, {
					img: '/static/u2989.png',
					name: '叶东',
					kc: '梧州学院高级教师'
				}, {
					img: '/static/u2989.png',
					name: '叶东',
					kc: '梧州学院高级教师'
				}],
				list: [{
						kfkc: '开发课程',
						a: '15'
					},
					{
						kfkc: '分享技巧',
						a: '8'
					},
					{
						kfkc: '原创文章',
						a: '1'
					},
					{
						kfkc: '高手粉丝',
						a: '92000'
					}
				],
				list1: [{
					img: '/static/u297.png',
					name: 'EthankDesingn',
					ly: '市场销售'
				}],
				jsjj: '18年销售管理工作经验，熟悉销售系统的各个岗位，对各岗位的素质、技能要求有系统深刻地认识，能针对各个行业，各种企业，各个岗位的具体要求，提供个性化的、实用的销售培训课程',
				a: '3',
				indicator: true,
				listaa: [{
					thumb: "https://cdn.uviewui.com/uview/goods/1.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/2.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/3.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/4.jpg"
				}, {
					thumb: "https://cdn.uviewui.com/uview/goods/5.jpg"
				}],
				style: 'border-bottom: 8rpx solid #7985FF;color:#7985FF;', // 控制 kc-a-a 的样式
				style1: '', // 控制 kc-a-b 的样式
				style2: '', // 控制 kc-a-c 的样式
				index: 0, // 用于更新显示的索引
				activeStyle: true, // 用于控制 kc-a-a 的显示
				activeStyle1: false, // 用于控制 kc-a-b 的显示
				activeStyle2: false // 用于控制 kc-a-c 的显示
			};
		},
		methods: {
			updateStyle(index) {
				console.log(index);
				// 根据点击的索引更新对应视图的显示和样式
				if (index == 0) {
					this.style = 'border-bottom: 8rpx solid #7985FF;color:#7985FF;';
					this.activeStyle = true;
					this.activeStyle1 = false;
					this.activeStyle2 = false;
				} else {
					this.style = '';
				}
				if (index == 1) {
					this.style1 = 'border-bottom: 8rpx solid #7985FF;color:#7985FF;';
					this.activeStyle = false;
					this.activeStyle1 = true;
					this.activeStyle2 = false;
				} else {
					this.style1 = '';
				}
				if (index == 2) {
					this.style2 = 'border-bottom: 8rpx solid #7985FF;color:#7985FF;';
					this.activeStyle = false;
					this.activeStyle1 = false;
					this.activeStyle2 = true;
				} else {
					this.style2 = '';

				}
			}
		}
	}
</script>

<style lang="scss">
	.app {
		padding: 0;
		margin: 0;
		background-color: #F8F8F8;
		width: 100%;
		height: 100%;

		.rw {
			width: 100%;
			height: 25vh;
			background-color: white;

			.rw-a {
				width: 90%;
				height: 50%;
				margin: 0 auto;
				display: flex;

				.rw-a-a {
					width: 20%;
					height: 100%;
					display: flex;
					justify-content: center;
					align-items: center;

					.rw-a-a-a {
						width: 65px;
						height: 65px;
						border-radius: 50px;
					}
				}

				.rw-a-b {
					width: 55%;
					height: 100%;
					color: #999999;

					.rw-a-b-a {
						width: 100%;
						height: 50%;
						display: flex;
						align-items: center;
					}

					.rw-a-b-b {
						width: 100%;
						height: 50%;
					}
				}

				.rw-a-c {
					width: 25%;
					height: 100%;
					display: flex;
					align-items: center;

					.rw-a-c-a {
						width: 85px;
						height: 35px;
						border-radius: 15px;
						background-color: #7985FF;
						display: flex;
						align-items: center;
						justify-content: center;
					}
				}
			}

			.rw-b {
				width: 90%;
				height: 50%;
				margin: 0 auto;
				display: flex;

				.rw-b-a {
					width: 25%;
					height: 100%;

					.rw-b-a-a {
						width: 100%;
						height: 50%;
						display: flex;
						justify-content: center;
						align-items: flex-end;

						text {
							font-size: 20px;
							font-weight: bold;
						}
					}

					.rw-b-a-b {
						width: 100%;
						height: 30%;
						display: flex;
						align-items: center;
						justify-content: center;

						text {
							font-size: 12px;
							color: #666666;
						}
					}
				}
			}


		}

		.kcjianj {
			width: 100%;
			height: 30vh;
			margin-top: 2vh;
			background-color: white;

			.kcjianj-a {
				width: 90%;
				height: 10vh;
				margin: 0 auto;
				display: flex;
				align-items: center;
			}

			.kcjianj-b {
				width: 90%;
				height: 18vh;
				margin: 0 auto;
				display: flex;
				align-items: flex-start;
			}
		}

		.tdcy {
			width: 100%;
			height: 22vh;
			margin-top: 2vh;
			background-color: white;

			.tdcy-a {
				width: 100%;
				height: 10vh;
				display: flex;
				align-items: center;
			}

			.tdcy-b {
				width: 100%;
				height: 15vh;
				display: flex;
				overflow-x: auto;
				/* 允许自动水平滚动 */
				scrollbar-width: none;
				/* 对于Firefox隐藏滚动条 */
			}


			.tdcy-b::-webkit-scrollbar {
				display: none;
				/* 对于基于WebKit的浏览器隐藏滚动条 */
			}

			.tdcy-b-a {
				width: 260px;
				height: 10vh;
				margin-right: 20px;
				background: -webkit-linear-gradient(270deg, rgba(219, 218, 252, 1) 0%, rgba(219, 218, 252, 1) 0%, rgba(221, 220, 252, 1) 22%, rgba(223, 220, 251, 1) 54%, rgba(235, 233, 254, 1) 75%, rgba(244, 242, 255, 1) 100%, rgba(244, 242, 255, 1) 100%);
				flex-shrink: 0;
				display: flex;

				.tdcy-b-a-a {
					width: 30%;
					height: 100%;
					display: flex;
					justify-content: center;
					align-items: center;

					image {
						width: 80%;
						height: 80%;

					}
				}

				.tdcy-b-a-b {
					width: 70%;
					height: 100%;

					.tdcy-b-a-b-a {
						width: 100%;
						height: 50%;
						display: flex;
						justify-content: space-between;
						align-items: center;

						text {
							font-size: 20px;
							font-weight: bold;
						}

						view {
							width: 70px;
							height: 30px;
							background-color: #704ED7;
							border-radius: 20px;
							font-size: 15px;
							color: white;
							margin-right: 10px;
							display: flex;
							align-items: center;
							justify-content: center;
						}
					}

					.tdcy-b-a-b-b {
						width: 100%;
						height: 50%;
						display: flex;
						align-items: flex-start;

						text {
							font-size: 15px;

						}
					}
				}

			}





		}

		.kc {
			width: 100%;
			height: 50vh;
			background-color: white;
			margin-top: 2vh;

			.kc-a {
				width: 100%;
				height: 8vh;
				display: flex;
				justify-content: space-evenly;

				.kc-a-a {
					width: 32%;
					height: 90%;
					display: flex;
					align-items: center;
					justify-content: center;

					text {
						font-size: 17px;
					}
				}

				.kc-a-b {
					width: 32%;
					height: 90%;
					display: flex;
					align-items: center;
					justify-content: center;

					text {
						font-size: 17px;
					}
				}

				.kc-a-c {
					width: 32%;
					height: 90%;
					display: flex;
					align-items: center;
					justify-content: center;

					text {
						font-size: 17px;
					}
				}
			}

			.kec {
				width: 100%;
				height: 42vh;

				.kec-a {
					width: 100%;
					height: 100%;

					//全部课程
					.qbkc {
						width: 93%;
						margin: 0 auto;

						.qbkc-a {
							width: 100%;
							height: 50px;
						}

						.qbkc-b {
							width: 100%;
							height: 50px;
							background-color: #3B55CB;
						}

						.qbkc-c {
							width: 100%;
							margin-top: 20px;
							display: flex;
							justify-content: space-between;

							.qbkc-c-a {
								width: 40%;
								height: 90px;
							}

							.qbkc-c-b {
								width: 58%;
								height: 90px;
								line-height: 30px;
							}
						}

					}

					// 加载中
					.jiazz {
						width: 93%;
						margin: 0 auto;
						height: 100px;

						.jiazz-a {
							padding: 24rpx 0;
							color: $u-content-color;
							font-size: 28rpx;
						}
					}
				}

				.kec-b {
					width: 100%;
					height: 100%;

					.kechen {
						width: 87%;
						height: 260px;
						margin: 0 auto;
						margin-top: 10px;

						.kechen-a {
							width: 100%;
							height: 67%;
							background-color: red;
						}

						.kechen-b {
							width: 100%;
							height: 33%;
							background-color: gray;
						}
					}
				}

				.kec-c {
					width: 100%;
					height: 100%;
				}
			}
		}


	}
</style>